** This class just manages the http reply/sending, not where the data
** comes from, etc.
*/
#ifndef _HTTPSERV_H_
#define _HTTPSERV_H_
#include "connection.h"
class JNL_HTTPServ
{
public:
JNL_HTTPServ(JNL_Connection *con);
~JNL_HTTPServ();
int run(); // returns: < 0 on error, 0 on request not read yet, 1 if reading headers, 2 if reply not sent, 3 if reply sent, sending data. 4 on connection closed.
char *geterrorstr() { return m_errstr;}
// use these when state returned by run() is 2
char *get_request_file(); // file portion of http request